home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 March / EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso / earcd / -archivi / -recent2 / ged_scripts.lha / GED_Scripts / InsertProto.rexx < prev    next >
OS/2 REXX Batch file  |  1999-01-12  |  1KB  |  50 lines

  1. /* $VER: InsertProto.rexx 1.2 (12.01.99)        */
  2. /* Freeware, ©1998-99 Christian Hattemer        */
  3. /* email: Chris@mail.riednet.wh.tu-darmstadt.de */
  4. /*                                              */
  5. /* Inserts a Method Prototype                   */
  6.  
  7. options results                             /* enable return codes     */
  8.  
  9. if (left(address(), 6) ~= "GOLDED") then    /* not started by GoldEd ? */
  10.  
  11.     address 'GOLDED.1'
  12.  
  13. 'LOCK CURRENT RELEASE=4'                    /* lock GUI, gain access   */
  14.  
  15. if (RC ~= 0) then
  16.  
  17.     exit
  18.  
  19. options failat 6                            /* ignore warnings         */
  20.  
  21. signal on syntax                            /* ensure clean exit       */
  22.  
  23. /* ---------------------- INSERT YOUR CODE HERE ---------------------- */
  24.  
  25. 'QUERY FILE VAR=Filename'
  26. Classname = LEFT(Filename, LASTPOS('.c', Filename) -1)
  27.  
  28. 'SET NAME=INSERT VALUE=TRUE'
  29.  
  30. 'FIRST'
  31.  
  32. /* Singe * must be written as ** because GoldEd uses them as Esc */
  33.  
  34. 'TEXT STAY T="METHOD _(Class **cl, Object **obj, Msg msg);"'
  35. 'GOTO COLUMN=8'
  36. 'TEXT T="'Classname'"'
  37. 'RIGHT'
  38.  
  39. /* ------------------------- END OF YOUR CODE ------------------------ */
  40.  
  41. 'UNLOCK'                                    /* unlock GUI              */
  42.  
  43. exit
  44.  
  45. SYNTAX:
  46.  
  47. SAY "Error in line" SIGL ":" ERRORTEXT(RC)
  48.  
  49. 'UNLOCK'
  50.